/*
 * Copyright (C) 2015-2018 EPAM Systems
 *
 * This file is part of Indigo ELN.
 *
 * Indigo ELN is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Indigo ELN is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Indigo ELN.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

@import 'variables.less';
@import 'mixin.less';
@import 'helper.less';

/******************FORMS STYLE*********************/

label {
  color: @label-color;
  font-weight: normal;
}

.control-label {
  padding-top: 7px;
}

.help-block, .validate-error {
  color: @help-txt-color !important;
  font-size: @help-txt-size;
}

//General Input styles

.form-control {
  box-shadow: none;
  padding-left: 10px;
  padding-right: 10px;
  outline: none;

  &:focus {
    border-color: @brand2;
    box-shadow: none;
  }
  &:disabled, &.disabled, &[disabled], &[readonly] {
    + label {
      cursor: not-allowed;
      pointer-events: none;
    }
    &:focus {
      border-color: #e5e5e5;
    }
  }
}

input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
  outline: 0 auto -webkit-focus-ring-color;
  outline-offset: 0;
}

textarea, .textarea-structure {
  resize: none;
}

//Select

.ui-select-container {
  .ui-select-match {
    .btn {
      border-color: @border-color;
      font: @font-size-base 'Source Sans Pro Regular', sans-serif;
      padding-left: 10px;
      padding-right: 10px;
      text-transform: none;

      .ui-select-match-text {
        .text-overflow();
        width: 96%;
      }
    }
  }
}

//Checkbox and radio

.my-checkbox-wrapper {
  margin-right: 20px;

  .my-checkbox {
    background-color: @white !important;
    border: 1px solid;
    border-color: @border-color !important;
    color: @brand2 !important;
    padding: 1px 3px 1px 5px !important;
    font: 10px 'Roboto Regular', sans-serif !important;
    margin-right: 5px;
    margin-top: -3px;

    &:hover {
      border: 1px solid;
    }
  }

  label {
    padding-left: 0;
  }
}

//checkbox-list

.checklist {
  &-wrap-lines {
    .checklist-item {
      display: block;
      margin-left: 20px;
      margin-bottom: 10px;
      &-all {
        margin-left: 0;
      }
    }
  }
  .checklist-item {
    &-all {
      font-weight: bold;
    }
  }
}

//Input Group

.input-group {
  input {
    text-overflow: ellipsis
  }

  &-btn {
    .btn {
      height: @input-height-base;

      + .btn {
        margin-left: 7px;
      }
    }
  }

  &-sm {
    .input-group-btn {
      .btn {
        height: 30px;
      }
    }
  }
}

//Input Right txt

.input-right-txt {
  .position-abs-top-right(-2px, 33px);
}

//Form-inline

.form-inline {
  .select-inline {
    width: 30%;
    display: inline-block;

    .form-control {
      width: 100%;
    }
  }
  &.form-batch-details,
  &.form-compound-details {
    .select-inline {
      width: 100px !important;

      .form-control {
        width: 100px;
      }
    }
    .my-checkbox-wrapper {
      margin-left: 10px;
    }
  }
}

//Password field

.password-block {
  position: relative;
}

.eye-icon {
  position: absolute;
  top: 10px;
  right: 10px;
}
